<?php

class MinimumFirst {
	public function coloring(Graph $graph) {
		while ($graph->getMinimalColor() == 0) {
			$vertex = $graph->getMinimalDegreeVertex($graph->getNonColoredVertices());
			$graph->setVertexColor($vertex, $graph->getMinimalFreeColor($graph->getVertexNeighbours($vertex)));
		}
	}
}

?>